﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SolutionBLL;
using SolutionModel;
using SFast;

public partial class admin_login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    //登录
    public void onlogin()
    {
        String account = Request.Form["txtAccount"];
        String password = Request.Form["txtPassword"];

        T_AdminUserBLL bll = new T_AdminUserBLL();
        T_AdminUser usr= bll.getUser(account, password);
        if (usr ==null)
        {
            this.divTips.InnerHtml = "用户名或密码错误请重新输入！";
        }
        else
        {
            MyUserLogin ul = new MyUserLogin();
            ul.Login(usr.Account, usr.UserID);
            Response.Redirect("index.aspx");
        }

    }

    //退出
    public void onQuit()
    {
        MyUserLogin ul = new MyUserLogin();
        ul.Quit();
        Response.Redirect("login.aspx");
    }
}